import java.util.*;

public class filter {
    public static void main(String[] args) {
        ArrayList<String> codeWithLN = new ArrayList<>();
        Scanner sc = new Scanner(System.in);
        int lines = Integer.parseInt(args[0]);
        for (int i = 0; i < lines; i++) {
            codeWithLN.add(sc.nextLine());
        }

        System.out.println();
        System.out.println("Result:");
        System.out.println();

        for (int i = 0; i < codeWithLN.size(); i++) {
            System.out.println(codeWithLN.get(i).substring(codeWithLN.get(i).indexOf(".") + 2));
        }

    }
}